import { request } from '@/utils'

export default {
  addTask: (projectId, name, content, owner, assist, column_id, times, p_level, p_name, p_color) => request.get(`/project/task/add?project_id=${projectId}&name=${name}&content=${content}&owner=${owner}&assist=${assist}&column_id=${column_id}&times=${times}&p_level=${p_level}&p_color=${p_color}&p_name=${p_name}`), // 新增卡片
  getBasic: userids => request.get(`/user/basic?userids=${userids}`), // 查询用户基本信息
  updateTask: data => request.post('/project/task/update', data), // 更新任务
  create: data => request.post('/user', data), // 创建用户
  read: (params = {}) => request.get('/user', { params }), // 读取用户
  update: data => request.patch(`/user/${data.id}`, data), // 更新用户
  delete: id => request.delete(`/user/${id}`),
  resetPwd: (id, data) => request.patch(`/user/password/reset/${id}`, data),
  getAllRoles: () => request.get('/role?enable=1'),
}
